﻿<%@ Page Title="" Language="C#" MasterPageFile="~/RepairTracker.Master" AutoEventWireup="true" CodeBehind="maintain.aspx.cs" Inherits="RepairTracker.maintain" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:ObjectDataSource ID="sourceProduct" runat="server" 
        SelectMethod="GetAllProducts" TypeName="RepairTracker.Entity">
    </asp:ObjectDataSource>
    <table width="100%" bgcolor="#CCFFCC">
    <tr>
        <td colspan="2" bgcolor="#99FF99" style="font-weight: bolder">更改产品信息</td>
    </tr>
    <tr>
        <td></td>
        <td>设备类型：<asp:DropDownList ID="lstDevice" runat="server" Width="100px">
            </asp:DropDownList>
        </td>
    </tr>
    <tr>
        <td></td>
        <td>网点：<asp:DropDownList ID="lstDistrict" runat="server" AutoPostBack="True" 
                onselectedindexchanged="lstDistrict_SelectedIndexChanged" Width="100px">
            </asp:DropDownList>
            <asp:DropDownList ID="lstOwner" runat="server" Width="250px">
            </asp:DropDownList>
        </td>
    </tr>
    <tr>
        <td></td>
        <td>序列号：<asp:TextBox ID="txtUpdateSerailNo" runat="server" Width="150px"></asp:TextBox>
        </td>
    </tr>
    <tr>
        <td></td>
        <td>Psam卡号：<asp:TextBox ID="txtUpdatePsamNo" runat="server" Width="150px"></asp:TextBox>
            固件版本：<asp:TextBox ID="txtUpdateVersion" runat="server" Width="100px"></asp:TextBox>
        </td>
    </tr>
    <tr>
        <td></td>
        <td>
            <asp:Button ID="btnUpdate" runat="server" Text="更新" onclick="btnUpdate_Click" />
            <asp:Label ID="lblUpdateError" runat="server" ForeColor="Red"></asp:Label>
        </td>
    </tr>    
    </table>
    <asp:GridView ID="viewProducts" runat="server" AutoGenerateColumns="False" 
        AutoGenerateSelectButton="True" BackColor="White" BorderColor="#CCCCCC" 
        BorderStyle="None" BorderWidth="1px" CellPadding="3" 
        DataSourceID="sourceProduct" 
        onselectedindexchanged="viewProducts_SelectedIndexChanged">
        <Columns>
            <asp:BoundField DataField="Id" HeaderText="Id" SortExpression="Id" 
                Visible="False" />
            <asp:BoundField DataField="DeviceId" HeaderText="DeviceId" 
                SortExpression="DeviceId" Visible="False" />
            <asp:BoundField DataField="DistrictName" HeaderText="DistrictName" 
                SortExpression="DistrictName" />
            <asp:BoundField DataField="OwnerName" HeaderText="OwnerName" 
                SortExpression="OwnerName" />
            <asp:BoundField DataField="DeviceName" HeaderText="DeviceName" 
                SortExpression="DeviceName" />
            <asp:BoundField DataField="SerialNo" HeaderText="SerialNo" 
                SortExpression="SerialNo" />
            <asp:BoundField DataField="PsamNo" HeaderText="PsamNo" 
                SortExpression="PsamNo" />
            <asp:BoundField DataField="DistrictId" HeaderText="DistrictId" 
                SortExpression="DistrictId" Visible="False" />
            <asp:BoundField DataField="OwnerId" HeaderText="OwnerId" 
                SortExpression="OwnerId" Visible="False" />
            <asp:BoundField DataField="Version" HeaderText="Version" 
                SortExpression="Version" />
            <asp:BoundField DataField="Counts" HeaderText="Counts" 
                SortExpression="Counts" />
        </Columns>
        <FooterStyle BackColor="White" ForeColor="#000066" />
        <HeaderStyle BackColor="#006699" Font-Bold="True" ForeColor="White" />
        <PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" />
        <RowStyle ForeColor="#000066" />
        <SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" />
        <SortedAscendingCellStyle BackColor="#F1F1F1" />
        <SortedAscendingHeaderStyle BackColor="#007DBB" />
        <SortedDescendingCellStyle BackColor="#CAC9C9" />
        <SortedDescendingHeaderStyle BackColor="#00547E" />
    </asp:GridView>
</asp:Content>
